import request from '@/utils/request'

export function getUserList(data) {
  return request({
    url: 'user/list',
    method: 'post',
    params: data
  })
}

export function getUser(id) {
  return request({
    url: 'user/get',
    method: 'post',
    params: { id }
  })
}

export function addUser(data) {
  return request({
    url: 'user/add',
    method: 'post',
    data
  })
}

export function editUser(data) {
  return request({
    url: 'user/edit',
    method: 'post',
    data
  })
}

export function editUserStatus(id, status) {
  return request({
    url: 'user/edit_status',
    method: 'post',
    params: { id, status }
  })
}
